
{% extends 'backweb/base.html' %}

{% block title %}
用户列表
{% endblock %}

{% block content %}

<section class="rt_wrap content mCustomScrollbar">
<div class="rt_content">

    <table class="table">
    <tr>
    <th>编号</th>
    <th>用户名</th>
    <th>超管</th>
    <th>角色</th>
    <th>操作</th>
    </tr>
    {% for user in users %}
    <tr>
    <td class="center">{{ user.id }}</td>
    <td class="center"><a>{{ user.username }}</a></td>
    <td class="center">{{ user.is_superuser }}</td>
    <td class="center">{{ user.u_r.r_name }}</td>

    <td class="center">
        <a href="{% url 'backweb:edit' %}" title="编辑" class="link_icon">&#101;</a>
        <a href="/backweb/delete?id={{ article.id }}" title="删除" class="link_icon">&#100;</a>
    </td>
    </tr>
    {% endfor %}
    </table>
    <aside class="paging">
        {% if page.has_previous %}
        <a href="{% url 'backweb:index' %}?page={{ page.previous_page_number }}">上一页</a>
        {% endif %}
        <a href="{% url 'backweb:index' %}?page=1">第一页</a>
        {% for i in page.paginator.page_range %}
            <a href="{% url 'backweb:index' %}?page={{ i }}">{{ i }}</a>
        {% endfor %}
        {% if page.has_next %}
        <a href="{% url 'backweb:index' %}?page={{ page.next_page_number }}">下一页</a>
        {% endif %}
    <a href="{% url 'backweb:index' %}?page={{ page.paginator.num_pages }}">最后一页</a>
    </aside>
</div>
</section>
{% endblock %}

